home *** CD-ROM | disk | FTP | other *** search
/ MacHack 1997 / MacHack 1997.toast / Hacks / Hacks ’97 / Warrior’s Progress / source code / Source / Libraries / Fonts / FontNumber.cp < prev    next >
Encoding:
Text File  |  1997-06-28  |  422 b   |  29 lines  |  [TEXT/CWIE]

  1. // FontNumber.cp
  2.  
  3. #ifndef FontNumber_h
  4. #include "FontNumber.h"
  5. #endif
  6.  
  7. FontNumber FontNumber::Make( int16 value )
  8.   {
  9.     if ( value == systemFont )
  10.         return System();
  11.  
  12.     if ( value == applFont )
  13.         return Application();
  14.     
  15.     return value;
  16.   }
  17.  
  18. FontNumber FontNumber::System()
  19.   {
  20.     static int16 font = GetSysFont();
  21.     return font;
  22.   }
  23.  
  24. FontNumber FontNumber::Application()
  25.   {
  26.     static int16 font = GetAppFont();
  27.     return font;
  28.   }
  29.